home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
NEW_TECH
/
NTUNZ2.ZIP
/
ZIPINFO.DOC
< prev
next >
Wrap
Text File
|
1992-08-21
|
15KB
|
334 lines
ZIPINFO(1) USER COMMANDS ZIPINFO(1)
NAME
zipinfo - list detailed information about a ZIP archive file
SYNOPSIS
zipinfo [-1smlvht] file[.zip] [filespec ...]
ARGUMENTS
file[.zip] Path of the ZIP archive. The suffix ``.zip'' is
applied if the file specified does not exist.
Note that self-extracting ZIP files are sup-
ported; just specify the ``.exe'' suffix your-
self.
[filespec] An optional list of archive members to be pro-
cessed. Expressions may be used to match multi-
ple members; be sure to quote expressions that
contain characters interpreted by the Unix
shell. See PATTERN MATCHING (below) for more
details.
OPTIONS
-1 list filenames only, one per line (useful for pipes)
-s list zipfile info in short Unix ``ls -l'' format:
default
-m list zipfile info in medium Unix ``ls -l'' format
-l list zipfile info in long Unix ``ls -l'' format
-v list zipfile information in verbose, multi-page format
-h list header line
-t list totals for files listed or for all files
PATTERN MATCHING
All archive members are listed unless a filespec is provided
to specify a subset of the archive members. The filespec is
similar to an egrep expression, and may contain:
* matches a sequence of 0 or more characters
? matches exactly 1 character
\nnn matches the character having octal code nnn
[...] matches any single character found inside the brack-
ets; ranges are specified by a beginning character, a
hyphen, and an ending character. If an exclamation
point or a carat (`!' or `^') follows the left
bracket, then the range of characters matched is com-
plemented with respect to the ASCII character set
(that is, anything except the characters inside the
brackets is considered a match).
DESCRIPTION
ZipInfo lists technical information about a ZIP archive,
including information file access permissions, encryption
status, type of compression, version and operating system of
compressing program, and the like. The default option is to
Info-ZIP Last change: 19 Aug 92 (v1.0) 1
ZIPINFO(1) USER COMMANDS ZIPINFO(1)
list files in the following format:
-rw-rwl--- 1.5 unx 2802 t- defX 11-Aug-91 13:48 perms.2660
The last three fields are clearly the modification date and
time of the file, and its name. The case of the filename is
respected; thus files which come from MS-DOS PKZIP are
always capitalized. If the file was zipped with a stored
directory name, that is also displayed as part of the
filename.
The second and third fields indicate that the file was
zipped under Unix with version 1.5 of Zip (a beta version).
Since it comes from Unix, the file permissions at the begin-
ning of the line are printed in Unix format. The
uncompressed file-size (2802 in this example) is the fourth
field.
The fifth field consists of two characters, either of which
may take on several values. The first character may be
either `t' or `b', indicating that Zip believes the file to
be text or binary, respectively; but if the file is
encrypted, ZipInfo notes this fact by capitalizing the char-
acter (`T' or `B'). The second character may also take on
four values, depending on whether there is an extended local
header and/or an ``extra field'' associated with the file
(explained in PKWare's APPNOTE.TXT). If neither exists, the
character will be a hyphen (`-'); if there is an extended
local header but no extra field, `l'; if the reverse, `x';
and if both exist, `X'. Thus the file in this example is
(apparently) a text file, is not encrypted, and has neither
an extra field nor an extended local header associated with
it. The example below, on the other hand, is an encrypted
binary file with an extra field:
RWD,R,R 0.9 vms 168 Bx shrk 9-Aug-91 19:15 perms.0644
Extra fields are used by PKWare for authenticity verifica-
tion(?) and possibly other purposes, and by Info-ZIP's Zip
1.6 and later to store OS/2, Macintosh and VMS file attri-
butes. This example presumably falls into the latter class,
then. Note that the file attributes are listed in VMS for-
mat. Other possibilities for the host operating system
include OS/2 with High Performance File System (HPFS), DOS
or OS/2 with File Allocation Table (FAT) file system, and
Macintosh, denoted as follows:
arc,,rw, 1.0 os2 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs
arc,hid,rdo,sys dos 4096 b- i4:2 14-Jul-91 12:58 EA DATA. SF
--w------- 1.0 mac 17357 bx i8:2 4-May-92 04:02 unzip.macr
Info-ZIP Last change: 19 Aug 92 (v1.0) 2
ZIPINFO(1) USER COMMANDS ZIPINFO(1)
File attributes in the first two cases are indicated in a
DOS-like format, where the file may or may not have its
archive bit set; may be hidden or not; may be read-write or
read-only; and may be a system file or not. If the attri-
butes are too long, the version number of the encoding
software is omitted. (The information is still available in
the verbose listing, however.) Interpretation of Macintosh
file attributes needs some work yet.
Finally, the sixth field indicates the compression method
and possible sub-method used. There are six methods known
at present: storing (no compression), reducing, shrinking,
imploding, tokenizing, and deflating. In addition, there
are four levels of reducing (1 through 4); four types of
imploding (4K or 8K sliding dictionary, and 2 or 3 Shannon-
Fano trees); and three levels of deflating (fast, normal,
maximum compression). ZipInfo represents these methods and
their sub-methods as follows: ``stor''; ``re:1,'' ``re:2,''
etc.; ``shrk''; ``i4:2,'' ``i8:3,'' etc.; ``tokn''; and
``defF,'' ``defN,'' and ``defX.''
The medium and long listings are almost identical to the
short format except that they add information on the file's
compression. The medium format indicates the file's
compression factor as a percentage:
-rw-rwl--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660
In this example, the file has been compressed by more than a
factor of five; the compressed data are only 19% of the ori-
ginal size. The long format gives the compressed file's
size in bytes, instead:
-rw-rwl--- 1.5 unx 2802 t- 538 defX 11-Aug-91 13:48 perms.2660
In addition to individual file information, a default zip-
file listing also includes header and trailer lines:
Archive: OS2.zip 5453 bytes 5 files
,,rw, 1.0 os2 730 b- i4:3 26-Jun-92 23:40 Contents
,,rw, 1.0 os2 3710 b- i4:3 26-Jun-92 23:33 makefile.os2
,,rw, 1.0 os2 8753 b- i8:3 26-Jun-92 15:29 os2unzip.c
,,rw, 1.0 os2 98 b- stor 21-Aug-91 15:34 unzip.def
,,rw, 1.0 os2 95 b- stor 21-Aug-91 17:51 zipinfo.def
5 files, 13386 bytes uncompressed, 4951 bytes compressed: 63%
The header line gives the name of the archive, its total
size, and the total number of files; the trailer gives the
number of files listed, their total uncompressed size, and
their total compressed size (not including any of Zip's
internal overhead). If, however, one or more filespecs are
provided, the header and trailer lines are not listed. This
Info-ZIP Last change: 19 Aug 92 (v1.0) 3
ZIPINFO(1) USER COMMANDS